#ifndef _DATA_S19_H
#define _DATA_S19_H
#include "stm32f4xx_hal.h"

#define IAP_STATUS_IDLE				1
#define IAP_STATUS_START			2
#define IAP_STATUS_END				3
#define IAP_STATUS_FINISH			4

typedef struct {
//	unsigned char *type;
//	unsigned char count;
//	unsigned long address;
//	unsigned char data[32];
//	unsigned short checksum;
    uint8_t		head;
    uint8_t		count;
    uint32_t	address;
    uint8_t		type;
    uint8_t		data[32];
    uint16_t	checksum;
} DATA_LINE;

extern unsigned char iapStatus;
extern unsigned int *pMemFlagAddr;


void InitDownload(void);
void DataProcess(void);
void ReportNext(void);

#define		MEM_DOWNLOAD_FLAG				0x80a5
#define		MEM_DOWNLOAD_START			0x80a1



#endif	//_DATA_S19_H
